<?php

class IndexControl extends CommonControl{
    public function index(){
        $this->display();
    }

    public function welcome()
    {
        $name = $_SESSION['admin']['username'];
        $this->assign('name',$name);
        $data =array();
        $db = M('user');
        $data['userNum'] = $db->count();
        $data['brandNum'] = $db->table('g_brand')->count();
        $data['catNum'] = $db->table('g_category')->count();
        $data['orderNum'] = $db->table('g_order')->count();
        $this->assign('data',$data);
        $this->display();
    }

}
?>